package cn.jyj.springframework.beans.factory;

/**
 *  Interface to be implemented by objects used within a {@link BeanFactory}
 *  which are themselves factories. If a bean implements this interface,
 *  it is used as a factory for an object to expose, not directly as a bean
 *  instance that will be exposed itself.
 *  @param <T>
 *
 * 需要提供3个方法，获取对象、对象类型，以及是否是单例对象，如果是单例对象依然会被放到内存中。
 *
 * @Author 老顽固小可爱
 * @Date 2023/1/9 15:32
 * @Version 1.0
 */
public interface FactoryBean<T> {

    T getObject() throws Exception;

    Class<?> getObjectType();

    boolean isSingleton();

}

